﻿using System;
using System.Collections.Generic;
using System.Text;

namespace ChuanYe.CountyFireManagement.Model
{
    public class FireInfoTool
    {
        public static string GetFireInfoRecordFormat(int mrType)
        {
            string content = string.Empty;
            switch (mrType)
            {
                case 0:
                    content = "{0}接{1}报警在 {2} 发生火灾，接报案内容：{3}"; break;
                case 3:
                    content = "因 {0} 特申请误报"; break;
                case 4:
                    content = "{0} 误报申请。原因：{1}"; break;
                case 6:
                    content = "因 {0} 申请启动三级响应"; break;
                case 11:
                    content = "{0}成立前指，地址：{1}。经度为：{2} 纬度为：{3}。总指挥：{4}。指挥部成员：{5}"; break;
                case 13:
                    content = "已向{0}调集{1}支扑火队伍"; break;
                case 17:
                    content = "{0}于{1}完成终报"; break;
                case 19:
                    content = "火点位置,经度：{0} 纬度：{1}"; break;
                case 20:
                    content = "经领导评估, 已对{0}启动{1}级响应"; break;
                case 21:
                    content = "{0}没有在规定时间内进行首报"; break;
                case 22:
                    content = "{0}没有在规定时间内进行续报"; break;
                case 23:
                    content = "{0}没有在规定时间内进行终报"; break;
                case 24:
                    content = "{0}因{1}被转到{2}，此处火灾结束"; break;
                case 25:
                    content = "{0}({1})于{2}派往现场进行核实"; break;
                case 27:
                    content = "{0}({1})于{2}派往现场进行驻守"; break;
                case 29:
                    content = "经 {0} 确认，向{1}周边地区负责人发送通知";break;
                case 30:
                    content = "已向 {0} ，{1} 个单位发送联动通知"; break;
                case 100025:
                    content = "已向{0}({1})发送火灾外勤通知"; break;
                case 100027:
                    content = "{0}于{1}向{2}({3})发送火灾驻守通知"; break;
            }
            return content;
        }

        public static string GetFireInfoMessageFormat(int messageType)
        {
            string content = string.Empty;
            switch (messageType)
            {
                case (int)MessageType.接收火灾:
                    content = "{0}，特此报告"; break;
                case (int)MessageType.首报倒计时提示:
                    content = "您还未对{0}进行首报，请在{1}(10分钟内)前进行首报"; break;
                case (int)MessageType.首报未作提示:
                    content = "{0}没有在{1}前进行首报"; break;
                case (int)MessageType.火灾首报:
                    content = "{0}于{1}完成首报";break;
                case (int)MessageType.火灾续报:
                    content = "{0}于{1}完成续报"; break;
                case (int)MessageType.续报未作提示:
                    content = "{0}没有在{1}前进行续报"; break;
                case (int)MessageType.续报倒计时提示:
                    content = "您还未对{0}进行续报，请在{1}(30分钟内)进行续报"; break;
                case (int)MessageType.报灭:
                    content = "{0}火灾已报灭"; break;
                case (int)MessageType.误报申请:
                    content = "{0}于{1}申请误报，请尽快处理。申请人：{2},申请理由：{3}";break;
                case (int)MessageType.误报审批:
                    content = "误报申请已审批，审批内容：{0}，审批结果：{1} "; break;
                case (int)MessageType.联动响应:
                    content = "{0} 现已启动联动响应，需要你部支援，请速回复上级单位"; break;
                case (int)MessageType.外勤调动:
                    content = "{0},{1}({2})发布火灾外勤指令,请你速前往火灾地点进行核实"; break;
                case (int)MessageType.调集扑救力量通知:
                    content = "{0},经{1}领导同意,现已启动{2}级响应;请你区派出({3})支扑火队赶赴现场支援,收到消息请立即回复,说明具体情况"; break;
                case (int)MessageType.驻守调动:
                    content = "{0},{1}({2})发布火灾驻守指令,请你速前往火灾地点进行驻守"; break;
            }
            return content;
        }


        public static List<KeyValuePair<int,string>> RecordEnum() 
        {
            List<KeyValuePair<int, string>> kvPairs = new List<KeyValuePair<int, string>>();
            foreach (int key in Enum.GetValues(typeof(RecordType)))
            {
                string value = Enum.GetName(typeof(RecordType), key);
                KeyValuePair<int, string> kvPair = new KeyValuePair<int, string>(key, value);
                kvPairs.Add(kvPair);
            }
            return kvPairs;
        }

        public static List<KeyValuePair<int, string>> MessageEnum()
        {
            List<KeyValuePair<int, string>> kvPairs = new List<KeyValuePair<int, string>>();
            foreach (int key in Enum.GetValues(typeof(MessageType)))
            {
                string value = Enum.GetName(typeof(MessageType), key);
                KeyValuePair<int, string> kvPair = new KeyValuePair<int, string>(key, value);
                kvPairs.Add(kvPair);
            }
            return kvPairs;
        }

        public static List<KeyValuePair<int, string>> MessageSendEnum()
        {
            List<KeyValuePair<int, string>> kvPairs = new List<KeyValuePair<int, string>>();
            foreach (int key in Enum.GetValues(typeof(MessageSendType)))
            {
                string value = Enum.GetName(typeof(MessageSendType), key);
                KeyValuePair<int, string> kvPair = new KeyValuePair<int, string>(key, value);
                kvPairs.Add(kvPair);
            }
            return kvPairs;
        }
    }

    public enum RecordType
    {
        火灾录入 = 0,
        回复 = 1,
        火灾首报 = 2,
        误报申请 = 3,
        误报审批 = 4,
        火灾续报 = 5,
        申请响应 = 6,
        询问 = 7,
        回答 = 8,
        启动响应 = 9,
        接收响应 = 10,
        成立前指 = 11,
        接收前指 = 12,
        扑救力量 = 13,
        调集提示 = 14,
        调集回复 = 15,
        火灾报灭 = 16,
        火灾终报 = 17,
        记录文档 = 18,
        定位火点 = 19,
        逐级响应 = 20,
        首报未按时操作 = 21,
        续报未按时操作 = 22,
        终报未按时操作 = 23,
        火灾转场= 24,
        外勤调动=100025,
        外勤核实=100026,
        驻守调动=100027,
        复燃核实=100028,
        通知周边 = 29,
        联动响应=30,
        上级火灾录入 = 31,
        处置完成 = 32,
    }

    public enum MessageType
    {
        接收火灾 = 0,
        火灾首报 = 1,
        火灾续报 = 2,
        火情询问 = 3,
        申请响应 = 4,
        接收响应 = 5,
        成立前指 = 6,
        调集扑火队 = 7,
        报灭 = 8,
        火灾终报 = 9,
        误报申请 = 10,
        火灾报告 = 11,
        接收火灾倒计时提示 = 12,
        首报倒计时提示 = 13,
        续报倒计时提示 = 14,
        终报倒计时提示 = 15,
        调集扑救力量回复 = 16,
        首报未作提示 = 17,
        续报未作提示 = 18,
        终报未作提示 = 19,
        火灾转场出 = 20,
        火灾转场入 = 21,
        定位火点 = 22,
        逐级响应 = 23,
        回复 = 24,
        误报审批=25,
        通知周边=26,
        启动响应=27,
        联动响应=28,
        调集扑救力量通知 = 29,
        外勤调动 = 100025,
        外勤核实 = 100026,
        驻守调动 = 100027,
        复燃核实 = 100028,

    }

    public enum MessageSendType 
    {
           下级向上级发送=1,
           上级向下级发送 = 2,
           用户对用户发送=3,
           全局发送=4,
           指定区域发送=5
    }
}
